package com.niiwoo.civet.trade.service.local.notify;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import com.niiwoo.civet.trade.dao.mapper.ProjectInvestOrderMapperExt;

@Service
public class PersonalizedNotifyTradeLoaclService {

	@Autowired
	private ProjectInvestOrderMapperExt projectInvestOrderMapperExt;
	
	public List<String> getOpenInvestmentAccountAfterUnInvestment(List<String> userIdList) {
		List<String> hasInvestmentForUserIdList = projectInvestOrderMapperExt.getHasInvestmentForUserIdList(userIdList);
		if (!CollectionUtils.isEmpty(hasInvestmentForUserIdList)) {
			userIdList.removeAll(hasInvestmentForUserIdList);
		}
		return userIdList;
	}
}